Method for measuring pose of robotic end tool

ABSTRACT

A method for measuring a pose of a robotic end tool, including: obtaining a three-dimensional feature of a flange and a three-dimensional feature of the end tool, establishing a first coordinate system and a second coordinate system at the center of the flange and the center of the end tool respectively, calculating a positional offset of the second coordinate system relative to the first coordinate system, and calculating a rotation offset of the second coordinate system relative to the first coordinate system according to each unit vector of the second coordinate system, so as to obtain a pose of the end tool relative to the flange. The method provided in the present application, compared with the manual observation method, the precision and stability of the pose measurement method are high.

TECHNICAL FIELD

The present application relates to the field of industrial robots, and more particularly relates to a method for measuring a pose of a robotic end tool.

BACKGROUND

With the development of high-end manufacturing, the requirement of machining precision of industrial robots is getting higher and higher. When using industrial robots to machine corresponding products, it is necessary to place machining tools such as welding guns and cutters at the end of the industrial robot. The precision of pose calibration of a tool center point directly affects the machining precision of the industrial robot. Herein, the pose refers to the position and posture of the end tool of the industrial robot in a specified coordinate system.

After the industrial robot is replaced with a new tool or after a long period of operation, a certain deviation of the center point of the tool will occur, resulting in a lowered machining precision of the robot. Therefore, it is necessary to measure the center point of the robotic end tool and perform deviation compensation. At present, for the measurement of the center point pose of the robotic end tool, the method of manual observation is usually adopted, and the multi-pose is approached to affixed point to realize the measurement of the center point pose of the end tool. However, this method relies on manual movement and visual observation, and its precision and stability are low.

SUMMARY

An object of the present application is to provide a method for measuring the pose of a robotic end tool, in order to solve the technical problem that the center point pose measurement of the robotic end tool in the prior art is low in precision and stability caused by the manual method.

The present application provides a method for measuring a pose of a robotic end tool, comprising the following steps:

obtaining a three-dimensional feature of a flange for clamping the end tool and a three-dimensional feature of the end tool;

determining a center of the flange according to the three-dimensional feature of the flange, determining a center of the end tool according to the three-dimensional feature of the end tool;

establishing a first coordinate system and a second coordinate system based on the center of the flange and the center of the end tool respectively;

calculating a positional offset of an origin of the second coordinate system relative to an origin of the first coordinate system;

calculating in the first coordinate system, a unit vector of a positive direction of the X-axis of the second coordinate system, a unit vector of a positive direction of the Y-axis, and a unit vector of a positive direction of the Z-axis in the first coordinate system, calculating a unit vector of a positive direction of the X-axis, a unit vector of a positive direction of the Y-axis, and a unit vector of a positive direction of the Z-axis of the second coordinate system; and

forming a posture transformation matrix of the second coordinate system by the unit vector of the positive direction of the X-axis, the unit vector of the positive direction of the Y-axis, and the unit vector of the positive direction of the Z-axis of the second coordinate system in commonly form a posture transformation matrix of the second coordinate system, and calculating a rotation offset of the second coordinate system relative to the first coordinate system by the posture transformation matrix.

Further, the specific steps of calculating the positional offset of the origin of the second coordinate system relative to the origin of the first coordinate system comprising:

The origin of the first coordinate system is defined as 0₁, the origin of the second coordinate system is defined as 0₂, and the coordinate value of 0₁ in the first coordinate system is defined as (0, 0, 0), and the coordinate value of 0₂ in the first coordinate system is defined as (x₀, y₀, z₀);

Calculating the positional offset as Δx=x₀, Δy=y₀, Δz=z₀: wherein the Δx is the positional offset of the second coordinate system relative to the first coordinate system in the X direction, the Δy is the positional offset of the second coordinate system relative to the first coordinate system in the Y direction, and the Δz is the positional offset of the second coordinate system relative to the first coordinate system in the Z direction.

Further, the step that in the first coordinate system, calculating a unit vector of a positive direction of the X-axis of the second coordinate system, a unit vector of a positive direction of the Y-axis, and a unit vector of a positive direction of the Z-axis specifically comprising:

taking Points P₁ and P₂ on the X-axis and the Y-axis of the second coordinate system respectively, and the coordinate values of P₁ and P₂ in the first coordinate system are defined as (x₁, y₁, z₁) and (x₂, y₂, z₂) respectively;

calculating the vector O₂P₁ =(x₁−x₀, y₁−y₀, z₁−z₀), and calculating the vector O₂P₂ =(x₂−x₀, y₂−y₀, z₂−z₀);

calculating a unit vector X of the O₂P₁ as

$\left( {\frac{x_{1} - x_{0}}{\sqrt{\left( {x_{1} - x_{0}} \right)^{2} + \left( {y_{1} - y_{0}} \right)^{2} + \left( {z_{1} - z_{0}} \right)^{2}}},\frac{y_{1} - y_{0}}{\sqrt{\left( {x_{1} - x_{0}} \right)^{2} + \left( {y_{1} - y_{0}} \right)^{2} + \left( {z_{1} - z_{0}} \right)^{2}}},\frac{z_{1} - z_{0}}{\sqrt{\left( {x_{1} - x_{0}} \right)^{2} + \left( {y_{1} - y_{0}} \right)^{2} + \left( {z_{1} - z_{0}} \right)^{2}}}} \right)$

wherein the X is a unit vector of the second coordinate system in the positive direction of the X-axis;

calculating a unit vector Y of the O₂P₂ as

$\left( {\frac{x_{2} - x_{0}}{\sqrt{\left( {x_{2} - x_{0}} \right)^{2} + \left( {y_{2} - y_{0}} \right)^{2} + \left( {z_{2} - z_{0}} \right)^{2}}},\frac{y_{2} - y_{0}}{\sqrt{\left( {x_{2} - x_{0}} \right)^{2} + \left( {y_{2} - y_{0}} \right)^{2} + \left( {z_{1} - z_{0}} \right)^{2}}},\frac{z_{2} - z_{0}}{\sqrt{\left( {x_{1} - x_{0}} \right)^{2} + \left( {y_{1} - y_{0}} \right)^{2} + \left( {z_{2} - z_{0}} \right)^{2}}}} \right)$

wherein the Y is a unit vector of the second coordinate system in the positive direction of the Y-axis;

calculating a unit vector Z of the second coordinate system in the positive direction of the Z-axis as X×Y.

Further, supposing the unit vector of the positive direction of the X-axis of the second coordinate system is (a₁, b₁, c₁), and the unit vector of the positive direction of the Y-axis of the second coordinate system is (a₂, b₂, c₂), the unit vector of the positive direction of the Z-axis of the second coordinate system is (a₃, b₃, c₃), and the posture transformation matrix is calculated as

$\begin{bmatrix} a_{1} & a_{2} & a_{3} \\ b_{1} & b_{2} & b_{3} \\ c_{1} & c_{2} & c_{3} \end{bmatrix}.$

Further, the rotation offset are defined as

${R_{x} = {\tan^{- 1}\frac{b_{1}}{a_{1}}}},{R_{y} = {\tan^{- 1}\frac{- c_{1}}{\sqrt{a_{1}^{2} + b_{1}^{2}}}}},{R_{z} = {\tan^{- 1}\frac{c_{2}}{c_{3}}}},$

wherein the R_(x) is a rotational offset of the second coordinate system relative to the first coordinate system on the X-axis, and the R_(y) is a rotational offset of the second coordinate system relative to the first coordinate system on the Y-axis, the R_(z) is a rotational offset of the second coordinate system relative to the first coordinate system on the Z-axis.

Further, obtaining the three-dimensional features of the flange and the end tool by a binocular three-dimensional scanner.

The beneficial effect of the method for measuring the pose of the robotic end tool provided by the present application is summarized as follows: comparing to the prior art, the method for measuring the pose of the robotic end tool of the present application establishes a first coordinate system and a second coordinate system at the center of the flange and the center of the end tool respectively, calculates a positional offset of the origin of the second coordinate system relative to the origin of the first coordinate system, and calculates a rotational offset of the second coordinate system relative to the first coordinate system by the posture transformation matrix of the second coordinate system, therefore obtains the pose of the end tool relative to the flange. The method for measuring the pose obtains the pose of the end tool by calculating the relative position and relative posture of the end tool and the flange, and compared with the manual observation method, the precision and stability of the pose measurement method are high.

BRIEF DESCRIPTION OF THE DRAWINGS

In order to make the technical solutions in the embodiments of the present application clearer, the accompanying drawings to be used in the embodiments and the description of the prior art will be briefly introduced below, it is apparent that the drawings in the following description are merely some embodiments of the present application and that other drawings may be obtained by those skilled in the field without departing from the inventive nature of the application.

FIG. 1 is a flowchart of implement of a method for measuring the pose of a robotic end tool according to an embodiment of the present application;

FIG. 2 is a schematic diagram of a method for measuring the pose of a robotic end too according to an embodiment of the present application;

FIG. 3 is a schematic diagram of a first coordinate system and a second coordinate system used in the embodiment of the present application.

In the drawings, the following reference numerals are used:

1—binocular three-dimensional scanner; 2—robot; 21—flange; 210—first coordinate system; 22—end tool; and 220—second coordinate system.

DETAILED DESCRIPTION OF THE EMBODIMENTS

In order to make the technical problems to be solved, technical solutions, and beneficial effects of the present application clearer and more understandable, the present application will be further described in detail hereinafter with reference to the accompanying drawings and embodiments. It should be understood that the embodiments described herein are only intended to illustrate but not to limit the present application.

It should be noted that when a component is referred to as being “fixed to” or “disposed on” another component, it can be directly or indirectly on another component. When a component is referred to as being “connected to” another component, it can be directly or indirectly connected to another component.

It should be understood that, “length”, “width”, “upper”, “lower”, “front”, “back”, “left” and “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside” and other terms indicating the orientation or positional relationship are based on orientation or positional relationship shown in the drawings, and are only for the purpose of facilitating the description of the application and simplifying the description, instead of indicating or implying that the indicated device or component must have a specific orientation and constructed and operated in a particular orientation, and therefore it cannot be construed as limitation of the application.

In addition, the terms “first” and “second” are for illustrative purposes only and should not be construed as indicating or implying a relative importance or implicitly indicating the quantity of technical features indicated. Therefore, a feature that defines “first” and “second” may expressly or implicitly include one or more of the features. In the description of the present application, “multiple” means two or more than two, unless otherwise specifically defined.

Please refer to FIG. 1 and FIG. 2, the method for measuring the pose of the robotic end tool provided by the present application will now be described. The robot 2 includes a robot arm, a flange 21 fixed to the robot arm, and an end tool 22 clamped at the flange 21, and the end tool 22 comprises a welding gun, a cutter, and the like. The pose of the robotic end tool refers to the position and posture of the end tool 22 in the specified coordinate system, and the position and posture of the end tool 22 can be used to represent as the position offset and the rotational offset of the end tool 22 relative to the specified coordinate system respectively. The method for measuring the pose comprises the following steps:

Step S101, which is specifically as follows:

a three-dimensional feature of the flange 21 for clamping the end tool 22 and a three-dimensional feature of the end tool 22 are obtained, that is, by obtaining an external contour lattice of the flange 21 and the end tool 22, the external contour lattice of the flange 21 are combined to form the three-dimensional feature of the flange 21, the external contour lattices of the end tool 22 are combined to form a three-dimensional feature of the end tool 22.

Further, in step S101, the three-dimensional feature of the flange 21 and the end tool 22 are obtained by the binocular three-dimensional scanner 1. When the binocular three-dimensional scanner 1 is used, the binocular three-dimensional scanner 1 is placed in the vicinity of the robotic end tool 22, and the external contour features of the end tool 22 and the flange 21 are scanned to obtain the external contour lattice of the end tool 22 and the flange 21, then upload the data of the external contour lattice to a reverse engineering software, the unneeded data are deleted using the reverse engineering software, and then the line fitting and surface fitting of the remaining lattice data are performed, and finally the three-dimensional feature is formed through the fitted line and surface.

Step S102, which is specifically as follows:

a center of the flange 21 is determined according to the three-dimensional feature of the flange 21, a center of the end tool 22 is determined according to the three-dimensional feature of the end tool 22. When determining the center of the flange 21 and the center of the end tool 22, the external contour lattices are firstly processed by reverse engineering software such as Germanic, Image ware or the like, the unnecessary lattice data are deleted, and then line fitting and surface fitting of the remaining lattice data are performed, and finally the center of the end tools 22 and the center of the flange 21 are determined through the fitted line and surface.

Step S103, which is specifically as follows:

a first coordinate system 210 and a second coordinate system 220 are established based on the center of the flange 21 and the center of the end tool 22 respectively, and the first coordinate system 210 and the second coordinate system 220 are Cartesian rectangular coordinate systems including mutually perpendicular X-axis, Y-axis and Z-axis;

Step S104, which is specifically as follows:

a positional offset of an origin of the second coordinate system 220 relative to an origin of the first coordinate system 210 is calculated, herein, the positional offset refers to positional offsets of the origin of the second coordinate system 220 relative to the origin of the first coordinate system 210 on the X-axis, the Y-axis, and the Z-axis, respectively.

Further, in step S104, as shown in FIG. 3, the origin of the first coordinate system 210 is defined as 0₁, the origin of the second coordinate system 220 is defined as 0₂, the coordinate value of 0₁ in the first coordinate system 210 is defined as (0, 0, 0), and the coordinate value of 0₂ in the first coordinate system 210 is defined as (x₀, y₀, z₀), the positional offset of the origin of the second coordinate system 220 relative to the origin of the first coordinate system 210 is defined as (Δx, Δy, Δz), wherein the Δx is the positional offset of the second coordinate system 220 relative to the first coordinate system 210 in the X direction, the Δy is the positional offset of the second coordinate system 220 relative to the first coordinate system 210 in the Y direction, and the Δz is the positional offset of the second coordinate system 220 relative to the first coordinate system 210 in the Z direction. So that Δx=x₀−0=x₀, Δy=y₀−0=y₀, Δz=z₀−0=z₀, it can be concluded that the positional offset of the end tool 22 relative to the flange 21 is (x₀, y₀, z₀).

Step S105, which is specifically as follows:

In the first coordinate system 210, a unit vector of the positive direction of the X-axis of the second coordinate system 220, a unit vector of the positive direction of the Y-axis, and a unit vector of the positive direction of the Z-axis are calculated, the first coordinate system 210 is used as a reference coordinate system, and the straight lines of the X-axis, the Y-axis, and the Z-axis of the second coordinate system 220 all have a certain direction. The respective directions of the X-axis, the Y-axis, and the Z-axis of the second coordinate system 220 can be represented by direction vectors, and the unit vectors of the X-axis, the Y-axis, and the Z-axis can be obtained by dividing each direction vector by the respective modular length.

Further, in step S105, please refer to FIG. 3, points P₁ and P₂ are respectively taken from the X-axis and the Y-axis of the second coordinate system 220 respectively, and the coordinate values of P₁ and P₂ in the first coordinate system 210 are defined as (x₁, y₁, z₁) and (x₂, y₂, z₂) respectively; P₁ and P₂ are any points on the X-axis and the Y-axis respectively; the vector direction of the directed line segment O₂P₁ is the same as the vector direction of the positive direction of the X-axis of the second coordinate system 220, and the vector direction of the directed line segment O₂P₂ is the same as the vector direction of the positive direction of the Y-axis of the second coordinate system 220,

So calculating the vector O₂P₁ =(x₁−x₀, y₁−y₀, z₁−z₀), the vector O₂P₂ =(x₂−x₀, y₂−y₀, z₂−z₀); and a unit vector X of the O₂P₁ as

$\overset{¯}{X} = \left( {\frac{x_{1} - x_{0}}{\sqrt{\left( {x_{1} - x_{0}} \right)^{2} + \left( {y_{1} - y_{0}} \right)^{2} + \left( {z_{1} - z_{0}} \right)^{2}}},{\frac{y_{1} - y_{0}}{\sqrt{\left( {x_{1} - x_{0}} \right)^{2} + \left( {y_{1} - y_{0}} \right)^{2} + \left( {z_{1} - z_{0}} \right)^{2}}}\frac{z_{1} - z_{0}}{\sqrt{\left( {x_{1} - x_{0}} \right)^{2} + \left( {y_{1} - y_{0}} \right)^{2} + \left( {z_{1} - z_{0}} \right)^{2}}}}} \right)$

a unit vector Y of the O₂P₂ as

$\overset{¯}{Y} = \left( {\frac{x_{2} - x_{0}}{\sqrt{\left( {x_{2} - x_{0}} \right)^{2} + \left( {y_{2} - y_{0}} \right)^{2} + \left( {z_{2} - z_{0}} \right)^{2}}},{\frac{y_{2} - y_{0}}{\sqrt{\left( {x_{2} - x_{0}} \right)^{2} + \left( {y_{2} - y_{0}} \right)^{2} + \left( {z_{2} - z_{0}} \right)^{2}}}\frac{z_{2} - z_{0}}{\sqrt{\left( {x_{2} - x_{0}} \right)^{2} + \left( {y_{2} - y_{0}} \right)^{2} + \left( {z_{2} - z_{0}} \right)^{2}}}}} \right)$

wherein the X is the unit vector of the second coordinate system 220 in the positive direction of the X-axis, the Y is the unit vector of the second coordinate system 220 in the positive direction of the Y-axis; the unit vector X and the unit vector Y are perpendicular to each other, according to the expressions of the X vector and the Y vector, a Z vector perpendicular to the plane in which the X vector and the Y vector are located can be calculated, and the Z vector is a unit vector in the positive direction of the Z-axis in the second coordinate system 220, supposing X=(a₁,b₁,c₁), Y=(a₂,b₂,c₂), wherein:

${a_{1} = \frac{x_{1} - x_{0}}{\sqrt{\left( {x_{1} - x_{0}} \right)^{2} + \left( {y_{1} - y_{0}} \right)^{2} + \left( {z_{1} - z_{0}} \right)^{2}}}},{b_{1} = \frac{y_{1} - y_{0}}{\sqrt{\left( {x_{1} - x_{0}} \right)^{2} + \left( {y_{1} - y_{0}} \right)^{2} + \left( {z_{1} - z_{0}} \right)^{2}}}}$ ${{c_{1} = \frac{z_{1} - z_{0}}{\sqrt{\left( {x_{1} - x_{0}} \right)^{2} + \left( {y_{1} - y_{0}} \right)^{2} + \left( {z_{1} - z_{0}} \right)^{2}}}},{a_{2} = \frac{x_{2} - x_{0}}{\sqrt{\left( {x_{2} - x_{0}} \right)^{2} + \left( {y_{2} - y_{0}} \right)^{2} + \left( {z_{2} - z_{0}} \right)^{2}}}},{b_{2} = \frac{y_{2} - y_{0}}{\sqrt{\left( {x_{2} - x_{0}} \right)^{2} + \left( {y_{2} - y_{0}} \right)^{2} + \left( {z_{2} - z_{0}} \right)^{2}}}},{c_{2} = \frac{z_{2} - z_{0}}{\sqrt{\left( {x_{2} - x_{0}} \right)^{2} + \left( {y_{2} - y_{0}} \right)^{2} + \left( {z_{2} - z_{0}} \right)^{2}}}},{so}}\mspace{14mu}$ ${\overset{¯}{Z} = {{\overset{¯}{X} \times \overset{¯}{Y}} = \left( {{{b_{1}c_{2}} - {b_{2}c_{1}}},\ {{a_{1}c_{2}} - {a_{2}c_{1}}},\ {{a_{1}b_{2}} - {a_{2}b_{1}}}} \right)}},$

according to the above steps, the unit vector of the X-axis positive direction, the Y-axis positive direction, and the Z-axis positive direction in the second coordinate system 220 can be obtained.

Step S106 specifically is:

The unit vector of the positive direction of the X-axis, the unit vector of the positive direction of the Y-axis, and the unit vector of the positive direction of the Z-axis of the second coordinate system 220 together form a posture transformation matrix of the second coordinate system 220, and a rotation offset of the second coordinate system 220 relative to the first coordinate system 210 is calculated by the posture transformation matrix.

Further, in step S106, the unit vector of the positive direction of the X-axis of the second coordinate system 220 is defined as X=(a₁,b₁,c₁), and the unit vector of the positive direction of the Y-axis of the second coordinate system 220 is defined as Y=(a₂,b₂,c₂), the unit vector of the positive direction of the Z-axis of the second coordinate system 220 is defined as Z=(a₃,b₃,c₃), wherein a₃=b₁c₂−b₂c₁, b₃=a₁c₂−a₂c₁, c₃=a₁b₂−a₂b₁, and the posture transformation matrix is calculated as

${\begin{bmatrix} a_{1} & a_{2} & a_{3} \\ b_{1} & b_{2} & b_{3} \\ c_{1} & c_{2} & c_{3} \end{bmatrix} = \begin{bmatrix} a_{1} & a_{2} & {{b_{1}c_{2}} - {b_{2}c_{1}}} \\ b_{1} & b_{2} & {{a_{l}c_{2}} - {a_{2}c_{1}}} \\ c_{1} & c_{2} & {{a_{1}b_{2}} - {a_{2}b_{1}}} \end{bmatrix}},$

the posture transformation matrix may represent the posture transformation of the second coordinate system 220 relative to the first coordinate system 210, that is, the posture transformation of the end tool 22 relative to the flange 21 may be indicated.

Further, in step S106, according to the posture transformation matrix can obtain, the rotation offset of the second coordinate system 220 relative to the first coordinate system 210, the rotation offset are

${R_{x} = {\tan^{- 1}\frac{b_{1}}{a_{1}}}},{R_{y} = {\tan^{- 1}\frac{- c_{1}}{\sqrt{a_{1}^{2} + b_{1}^{2}}}}},{R_{z} = {\tan^{- 1}\frac{c_{2}}{c_{3}}}},$

wherein the R_(x) is a rotational offset of the second coordinate system 220 relative to the first coordinate system 210 on the X-axis, and the R_(y) is a rotational offset of the second coordinate system 220 relative to the first coordinate system 210 on the Y-axis, the R_(z) is a rotational offset of the second coordinate system 220 relative to the first coordinate system 210 on the Z-axis, and then substituting a₃=b₁c₂−b₂c₁, b₃=a₁c₂−a₂c₁, c₃=a₁b₂−a₂b₁ into the expression of the rotation offset, which can obtain

${R_{x} = {\tan^{- 1}\frac{b_{1}}{a_{1}}}},{R_{y} = {\tan^{- 1}\frac{- c_{1}}{\sqrt{a_{1}^{2} + b_{1}^{2}}}}},{R_{z} = {\tan^{- 1}\frac{c_{2}}{{a_{1}b_{2}} - {a_{2}b_{1}}}}},$

wherein a₁, b₁, c₁, a₂, b₂, c₂ are obtained when solving the unit vector of the positive direction of the X-axis and the positive direction of the Y-axis in the second coordinate system 220, and substituting the value of a₁, b₁, c₁, a₂, b₂ and c₂ into the expression of the rotation offset defined as get the result of the final rotation offset.

The method for measuring the pose of the robotic end tool provided by the present application, the method establishes a first coordinate system 210 and a second coordinate system 220 at the center of the flange 21 and the center of the end tool 22 respectively, calculates a positional offset of the origin of the second coordinate system 220 relative to the origin of the first coordinate system 210, and calculates a rotational offset of the second coordinate system 220 relative to the first coordinate system 210 by the posture transformation matrix of the second coordinate system 220, therefore obtains the pose of the end tool 22 relative to the flange 21, the method for measuring the pose obtains the pose of the end tool 22 by calculating the relative position and relative posture of the end tool 22 and the flange 21, and the precision and stability of the pose measurement method are high.

It's obvious that the aforementioned embodiments are only preferred embodiments of the present application, and are not intended to limit the present application. Any modification, equivalent replacement, improvement, and so on, which are made within the spirit and the principle of the present application, should be comprised in the scope of the present application. 

1-6. (canceled)
 7. A method for measuring a pose of a robotic end tool, comprising: obtaining a three-dimensional feature of a flange for clamping the end tool and a three-dimensional feature of the end tool; determining a center of the flange according to the three-dimensional feature of the flange, determining a center of the end tool according to the three-dimensional feature of the end tool; establishing a first coordinate system and a second coordinate system based on the center of the flange and the center of the end tool acting as the origin of first coordinate system and the origin of the second coordinate system respectively; calculating a positional offset of the origin of the second coordinate system relative to the origin of the first coordinate system; in the first coordinate system, calculating a unit vector in a positive direction of the X-axis, a unit vector in a positive direction of the Y-axis, and a unit vector in a positive direction of the Z-axis of the second coordinate system; and collectively forming a posture transformation matrix of the second coordinate system by the unit vector of the positive direction of the X-axis, the unit vector of the positive direction of the Y-axis, and the unit vector of the positive direction of the Z-axis of the second coordinate system, and calculating a rotation offset of the second coordinate system relative to the first coordinate system by the posture transformation matrix.
 8. The method of claim 7, wherein the step of calculating the positional offset of the origin of the second coordinate system relative to the origin of the first coordinate system particularly comprising: defining the origin of the first coordinate system as 0₁, defining the origin of the second coordinate system as 0₂, and defining a coordinate value of 0₁ in the first coordinate system as (0, 0, 0), and defining a coordinate value of 0₂ in the first coordinate system as (x₀, y₀, z₀); and calculating the positional offset as Δx=x₀, Δy=y₀, Δz=z₀, wherein the Δx is the positional offset of the second coordinate system relative to the first coordinate system in the X direction, the Δy is the positional offset of the second coordinate system relative to the first coordinate system in the Y direction, and the Δz is the positional offset of the second coordinate system relative to the first coordinate system in the Z direction.
 9. The method of claim 8, wherein the step that in the first coordinate system, calculating a unit vector in a positive direction of the X-axis of the second coordinate system, a unit vector of in positive direction of the Y-axis, and a unit vector of in positive direction of the Z-axis specifically comprising: taking points P₁ and P₂ on the X-axis and the Y-axis of the second coordinate system respectively, and defining coordinate values of P₁ and P₂ in the first coordinate system as (x₁, y₁, z₁) and (x₂, y₂, z₂) respectively; calculating the vector O₂P₁ =(x₁−x₀, y₁−y₀, z₁−z₀), and calculating the vector O₂P₂ =(x₂−x₀, y₂−y₀, z₂−z₀); calculating a unit vector X of the O₂P₁ as $\left( {\frac{x_{1} - x_{0}}{\sqrt{\left( {x_{1} - x_{0}} \right)^{2} + \left( {y_{1} - y_{0}} \right)^{2} + \left( {z_{1} - z_{0}} \right)^{2}}},{\frac{y_{1} - y_{0}}{\sqrt{\left( {x_{1} - x_{0}} \right)^{2} + \left( {y_{1} - y_{0}} \right)^{2} + \left( {z_{1} - z_{0}} \right)^{2}}}\frac{z_{1} - z_{0}}{\sqrt{\left( {x_{1} - x_{0}} \right)^{2} + \left( {y_{1} - y_{0}} \right)^{2} + \left( {z_{1} - z_{0}} \right)^{2}}}}} \right)$ wherein the X is a unit vector of the second coordinate system in the positive direction of the X-axis; calculating a unit vector Y of the O₂P₂ as $\left( {\frac{x_{2} - x_{0}}{\sqrt{\left( {x_{2} - x_{0}} \right)^{2} + \left( {y_{2} - y_{0}} \right)^{2} + \left( {z_{2} - z_{0}} \right)^{2}}},{\frac{y_{2} - y_{0}}{\sqrt{\left( {x_{2} - x_{0}} \right)^{2} + \left( {y_{2} - y_{0}} \right)^{2} + \left( {z_{2} - z_{0}} \right)^{2}}}\frac{z_{2} - z_{0}}{\sqrt{\left( {x_{2} - x_{0}} \right)^{2} + \left( {y_{2} - y_{0}} \right)^{2} + \left( {z_{2} - z_{0}} \right)^{2}}}}} \right)$ wherein the Y is a unit vector of the second coordinate system in the positive direction of the Y-axis; and calculating a unit vector Z of the second coordinate system in the positive direction of the Z-axis as X×Y.
 10. The method of claim 7, wherein the unit vector in the positive direction of the X-axis of the second coordinate system is defined as (a₁, b₁, c₁), and the unit vector in the positive direction of the Y-axis of the second coordinate system is defined as (a₂, b₂, c₂), the unit vector in the positive direction of the Z-axis of the second coordinate system is defined as (a₃, b₃, c₃), and the posture transformation matrix is calculated to be $\begin{bmatrix} a_{1} & a_{2} & a_{3} \\ b_{1} & b_{2} & b_{3} \\ c_{1} & c_{2} & c_{3} \end{bmatrix}.$
 11. The method of claim 10, wherein the rotation offsets are ${R_{x} = {\tan^{- 1}\frac{b_{1}}{a_{1}}}},{R_{y} = {\tan^{- 1}\frac{- c_{1}}{\sqrt{a_{1}^{2} + b_{1}^{2}}}}},{R_{z} = {\tan^{- 1}\frac{c_{2}}{c_{3}}}},$ wherein the R_(x) is a rotational offset of the second coordinate system relative to the first coordinate system on the X-axis, and the R_(y) is a rotational offset of the second coordinate system relative to the first coordinate system on the Y-axis, the R_(z) is a rotational offset of the second coordinate system relative to the first coordinate system on the Z-axis.
 12. The method of claim 7, wherein the three-dimensional features of the flange and the end tool are obtained by a binocular three-dimensional scanner. 